package C30;

/**
 * ClassName: Code04_SingleNumber
 * Package: C30
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/12/17 15:32
 * @Version 1.0
 * @Since 1.0
 */
public class Code04_SingleNumber {
    public static void main(String[] args) {
        int[] arr = {1,1,3,3,4,5,6,5,6};
        System.out.println(singleNumber(arr));
    }

    public static int singleNumber(int[] nums) {
        int result = 0;
        for (int i = 0; i < nums.length; i++) {
            result ^= nums[i];
        }
        return result;
    }
}
